Dynomotion

Group: DynoMotion Message: 13357 From: geast1967 Date: 6/14/2016
Subject: Feedhold c programm
Hi everybody.
I have set on KmotionCNC the M3 to Exec/wait/sync a C program, in order to lower the Z axis until it closes a contact and then resume the motion. It works fine, except when i set the Resume button the same way exec/wait/sync the same C program, as on M3 the execution freezes, it waits for ever the C program to finish but the C program at the first functions stalls and nothing happens. When i set the Resume button to just execute the c program then the c program executes all the way and finishes, but also the gcode is running and this is something i don't want. The gcode should wait the C program to finish first and then continue.
I have attached the C program. I set the M3 to run the C program on thread 2 and the resume button on thread 4.
Please advice what i'm doing wrong.


  @@attachment@@
Group: DynoMotion Message: 13363 From: geast1967 Date: 6/15/2016
Subject: Re: Feedhold c programm
Anybody can help please?
Group: DynoMotion Message: 13364 From: Tom Kerekes Date: 6/16/2016
Subject: Re: Feedhold c programm

I believe there is a dead lock because the Resume Button basically blocks KMotionCNC from continuing waiting for the C Program to finish.  But the C program is requesting KMotionCNC to do the things listed below which it can't because it is blocked.

    SetVars(110, 20, 10);
    DoPCInt(PC_COMM_GETAXISRES, 50);
    DoPCFloat(PC_COMM_SET_Z, PLATETHICKNESS);

Are those things necessary?  Or can those be handled a different way?

Regards

TK



On 6/15/2016 11:08 PM, g.astras@... [DynoMotion] wrote:
 

Anybody can help please?